<?php

class Auth extends MY_Controller
{
	function login()
	{	
	
			
		
		$data = array();
		
		if($_POST)
		{
			// The user has submitted the login form
			$admin = admin::validate_login($_POST['username'],$_POST['password']);
			
			if($admin)
					redirect('admin990/dashboard');
		
			else
			{
		   		 $data['message']= 'The user / password combination that you have entered is invalid.';
			}
		}
		
	   $this->load->view('admin/auth/login',$data);

	}
	
	function logout()
	{
	  admin::logout();
	  
	
	}
}